Making, PCB Manufacture

Sending G-Code to the iModela CNC

I’m using the Eagle PCB design tool from CadSoft to lay out my PCBs.  There’s a great library for this tool which will convert your PCB design into G-Code, which allows you to send this to a CNC milling machine.

I’m interested in using this G-Code with my iModela device, so I’ve been investigating how to do this.

It turns out that this is pretty simple, but you may need to tweak your G-Code slightly to make sure the iModela is able to recognise it. I’ll present a simple example below.

Note: This post doesn’t explain how to move your milling bit to the zero position on the machine – if you have the iModela, that is all covered in the instructions which ship with the machine.

Step 1: Open iModela Controller

I use this software application to send G-Code. I needed to change a few settings in here.

I found that by default, the “User Coordinate System” setting was selected in the dropdowns at the top of the main dashboard, as shown below.

imodela controller

Step 2: Change the setup from expecting custom Roland commands to standard G-Code

Click on the “Setup” button, which is shown in the above screenshot at the bottom right of the dashboard.

When you click on this, you’ll see a screen like the one below.iModela controller setup

The RML-1 is probably selected by default. Make sure that the option “NC Code” is selected, and click OK.

Step 3: Select the G-Code to be processed

I created a simple G-Code file for this post – I’ve pasted it below.
%
G90
G21
G00 Z1000
G00 X1000Y3000
G00 X0Y0Z0
%

  • The opening and closing % signs are necessary for the iModela software to recognise the code as G-Code.
  • G90 signifies absolute positioning.
  • G21 signifies we’re using metric convention.
  • This program moves the bit up 1mm in the Z-axis, then across 1mm in the X-axis and 3mm in the Y-axis, and finally returns to the zero position.
  • I saved this to a file names test.nc and saved on my desktop.

To load this into the Controller software, click on “Cut” (which is located in the bottom right corner of the Controller dashboard). This will open the screen below:

imodela controller cut gcodeTo add the G-Code file that you want to send to the iModela, click on the “Add” button, browse to the file you want to add, and then select it. You can see in the “Cut” screenshot above that I’ve already done this. The contents of the file are previewed in the right hand side of the screen.

Step 4: Send the G-Code

You can test the G-Code one line at a time if you like – click on the “Test…” button to open a debugging screen. I’ve stepped through the first 5 lines of code already in the “Test Cut” screenshot below, and you can see how the Controller dashboard in the background is reporting that the bit is presently positioned where I expect it to be (1mm up, 1mm across, and 3mm forward).imodela controller test cutYou can send the complete file by clicking “Close” on this screen, and then clicking on “Output” on the “Cut” screen.